home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 40.zip
/
BS1 part 40
/
Doc_disk2.adf
/
CygnusEd.Doc
< prev
next >
Wrap
Text File
|
1978-11-16
|
15KB
|
385 lines
Professional ACTIVATOR
============================================
The ED command provided on the disk is a small (1.5K) utility which
will summon CED or pass additional files to CED.
When CED is not running, ED (when run from the CLI) will run a copy of
CED and pass CED its filename(s). For example:
1> ED myfile1 myfile2
will call up a new copy of CED and pass it "myfile1" and "myfile2" as
two new files to load.
When CED is running, ED will not run an additional copy of CED, but
will pass the filename(s) to the existing CED. If CED is dormant (not
on-screen, but waiting for a HOTKey), then ED will awaken it with the
file(s) specified. If CED is active with one or more files already
on-screen, then ED will open additional views with the extra files in them,
but will leave the original views active.
A special ED command line is the form:
1> ED myfile -STICKY
Page 101
----------------------------------------------------------------------------
The -STICKY option is valid only at the end of the command and only
when exactly one filename is given. Normally, ED will pass the file
name(s) to CED and return immediately, allowing other programs to run in
the normal multitasking mode. The -STICKY option overrides this and will
not release ED until the user quits out of the file specified (in this
case, "myfile1"). This is designed to be used in command files where you
want the execution of the batch file or command script to wait until the
user has finished editing a particular file. ED will return (using the
sticky option) when the user either quits out of the file, clears the file
or loads a new file in over top of the old one.
ED is very useful in command files. For example, a command file which
assembles a program may produce an error file and return an error status
when there are errors. The following script will automatically put the
error file in the editor if errors are present:
; This batch file called WORKPROJ will continually run until
; the file PROJECT.ASM will assemble without any errors
;
Asm >Project.err Project.asm -oproject.o
If Error
Ed Project.err -STICKY
Execute Workproj
Endif
; The Assembly worked - exit batch file
Due to a limitation in the current release of ED, ED will not invoke
CygnusEd Professional if ED was started from the WorkBench and CEDPro was
not already running. However, invoking ED from the CLI will cause CEDPro
to being running if it was not already either dormant or running.
To run ED from the WorkBench, you can click on the file you want to
edit, and then while holding the shift key down, double click on the ED
icon. Alternatively you can use the SET ICON TOOL NAME menu option in
CygnusEd Professional to set the default tool name to C:ED so that double
clicking on the file name will run ED which will then pass the file name to
an already running CygnusEd Professional.
When ED runs CygnusEd Professional it looks for it under just the name
'CED'. If you call it E or CygnusEd Professional then ED will not be able
to find it. However, ED will have no trouble finding CygnusEd
Professional, by any name, if CygnusEd Professional is already in memory
(either running or dormant).
Page 102
----------------------------------------------------------------------------
========================================
Chapter 14
RecoverCedFiles - DISASTER INSURANCE
========================================
Because the Amiga is a multitasking operating system, many users run
several programs at one time. Unfortunately, the Amiga architecture does
not provide secure error trapping in all cases. This produces the famed
"Guru Meditation" error. When a program produces this error, all other
programs (including CED) will stop. You then have to reboot the computer.
When a machines "crashes" this way, all the data is considered lost.
If you were making changes to a file in CED and did not save the file
before the crash, then those changes are lost.
Fortunately, we have provided a helpful utility program called
RecoverCEDFiles. This program will scan all the memory trying to find the
CED files as they were in memory when the system crashed. When it finds
each file, it will report which file it found, the size and the number of
changes that were made since the last time it was saved. If you want to
save the file, you can specify the filename to save it under using the
standard file requester.
Page 103
----------------------------------------------------------------------------
After a system crash, all memory is returned to a "free memory pool".
This means that the memory that was being used by the CED file buffers is
no longer protected. Because of this, the memory may become polluted or
the file may be lost entirely. To be sure to be able to recover the files
after a system crash, run RecoverCEDFiles as soon as possible after you
reboot the computer. To improve your chances of safely recovering the
files, halt your startup sequence by typing CTRL-D and then run
RecoverCEDFiles IMMEDIATELY!
WARNING: It is possible that a file in memory may have been damaged,
perhaps completely wiped out, during a crash. If this happens,
RecoverCEDFiles may still recover the file, and let you save it to disk.
However, what it is recovering may be garbage. It is VERY important that
you save any recovered files to a temporary file name and that you verify
that the file is intact before copying it over your previous copy.
To run RecoverCEDFiles from the CLI, just enter:
1> RECOVERCEDFILES
To run RecoverCEDFiles from the workbench, double click on its icon.
RecoverCEDFiles does take a few seconds to run. About one second for
every megabyte of memory you have. While it is searching memory it locks
out all other tasks, including Intuition. This means that your mouse
pointer freezes while it is looking. DON'T PANIC. This is normal and
should only last a few seconds.
Page 104
----------------------------------------------------------------------------
==============================
Chapter 15
TECHNICAL SUPPORT SERVICES
==============================
15.1 Technical Support
Should you run into any problems with the supplied disk or manual or
have questions pertaining to the operation of CygnusEd Professional
contact:
ASDG Incorporated
925 Stewart Street
Madison, Wisconsin 53713
(608) 273-6585
If you are reporting a problem with the editor software, please
provide a description of what functions you where doing when the problem
appeared. Please provide as many details as possible - this will greatly
aid our software team in correcting the problem quickly.
15.2 Network Support
ASDG staff is available to answer your questions and assist you in
solving problems relating to CygnusEd Professional on three major computer
networks.
Page 105
----------------------------------------------------------------------------
1. The Byte Information eXchange
2. Compuserve
3. UseNet
On BIX and Compuserve, ASDG support is rendered in formal support
areas. On BIX type
join asdg
The formal support group on Compuserve is still in the process of
being set up at the time of this writing. Support on UseNet is informal.
Page 106
----------------------------------------------------------------------------
end of document, phew!
first allocate a
CedMsg structure. The C language declaration for this structure is:
struct CedMsg {
struct Message cm_Node;
LONG RFU1;
LONG RFU2;
LONG rm_Action;
Page 94
----------------------------------------------------------------------------
LONG rm_Result1;
LONG rm_Result2;
char *cm_Args[16];
LONG RFU7;
LONG RFU8;
LONG RFU9;
LONG RFU10;
LONG RFU11;
LONG RFU12;
}:
Only some of these fields are needed. The others are for use with
ARexx only. The most important field is the cm_Args field or, to be more
precise, cm_Args[0]. All commands to CygnusEd Professional are null
terminated strings and a pointer to those strings is always put into
cm_Args[0]. If you are merely interested in sending commands to CygnusEd
Professional and don't care about getting results back you can ignore all
of the other fields.
The rm_Action field is a flag field. The only flag we are interested
in is the RXFB_RESULT flag, which is bit 17 (counting from zero). When
this bit is set, CygnusEd Professional will return results if appropriate.
The commands that can cause CygnusEd Professional to return results (if
this bit is set) are the status command, the okay1 command, the okay2
command, the getstring command, the getfilename command and any commands
that cause an information requester (with one or two gadgets) to appear.
The rm_Result1 field is used to return any error numbers to the driver
program. The error numbers and their meanings are documented above.
The rm_Result2 field is used to return results from CygnusEd
Professional when the RXFB_RESULT flag is set in the rm_Action field and a
result returning command is sent to CygnusEd Professional. If the result
is a number (such as would be returned if you asked for the status of a
flag such as the word wrap flag) then the number itself is in the
rm_Result2 field. If the result is a string (such as the current line or
the tab stops) then rm_Result2 is a pointer to a string, usually null
terminated (if the contents of a block buffer is returned there may be
other zeroes in the string). The length of the string is returned in the
previous long word. It is your responsibility to free up the memory. The
following routine will do that for you quite handily.
FreeMyString(location)
char *location;
{
long *RealLocation;
if (!location) return;
RealLocation = (long *)location;
RealLocation--;
FreeMem(RealLocation, *RealLocation);
}
Page 95
----------------------------------------------------------------------------
To send a message to CygnusEd Professional you need to follow these
steps. Put a pointer to your command string (all ascii, including any
numbers) in cm_Args[0]. The cm_Node.mn_Node.ln_Type field should be filled
with NT_MESSAGE, an Amiga constant. The cm_Node.mn_Length field should be
filled with sizeof(struct CedMsg). The rm_Result2 field should be zeroed
to make sure you don't mistakenly think that CygnusEd Professional has
returned a result when it hasn't. If you want results then the rm_Action
field should be set to 1 shifted left by RXFB_RESULT bits and should be
zeroed otherwise. Now you need to do a FindPort() on "rexx_ced" to find
out where to send the message to. You also need to do a
CreatePort("MyPort", 0L) so you will have a return port. The address of
this return port should be put into cm_Node.mn_ReplyPort. Now you can send
the message. You then need to wait for a reply and then delete your reply
port. The code below does all of this for you. Note this assumes that you
want results and that you will delete any strings that are returned to you.
#define RXFB_RESULT 17
BOOL SendCygnusEdMessageGetReply(thecommand)
char *thecommand;
{
TheMessage.cm_Args[0] = thecommand;
TheMessage.cm_Node.mn_Node.ln_Type = NT_MESSAGE;
TheMessage.cm_Node.mn_Length = sizeof(struct CedMsg);
TheMessage.rm_Action = 1L << RXFB_RESULT; /* We do want results. */
TheMessage.rm_Result2 = 0; /* clear out the last result. */
if (!(CedPort = FindPort("rexx_ced"))) return((BOOL)FALSE);
if (!(MyPort = CreatePort("MyPort", 0L))) return((BOOL)FALSE);
TheMessage.cm_Node.mn_ReplyPort = MyPort;
PutMsg(CedPort, &TheMessage);
WaitPort(MyPort);
DeletePort(MyPort);
return((BOOL)TRUE);
}
Page 96
----------------------------------------------------------------------------
Page 97
----------------------------------------------------------------------------
Page 98
----------------------------------------------------------------------------
=========================
Chapter 12
TECHNICAL INFORMATION
=========================
All text editors have limitations - CED tries to put them out of the
reach of normal use. Here are some of the important limitations:
Maximum document size: as much memory as you have
Maximum number of views: ten
Maximum line length: 1024 characters
The characters interpreted as end-of-line (EOL) characters are the
ASCII values: 0-8 and 10-13.
The characters interpreted as white space characters are TAB (ASCII
9), SPACE (ASCII 32), and EOL characters. To force a space character that
will not be stripped out by LAYOUT mode if on the end of line, and will not
be considered a word separator, use ALT-SPACE.
CED is designed to work with either PAL or NTSC monitors (or
high-resolution cards when they become available).
CED will use any keymap set using the standard SETMAP function. So if
you prefer using a Dvorak keyboard or a german style keyboard - no problem.
The CLI command:
1> SETMAP USA1
will set your keyboard to Dvorak. Remember that the SETMAP command
must be done BEFORE CygnusEd Professional is run.
Page 99
----------------------------------------------------------------------------
When a file is loaded, it is all loaded into memory at once. This has
an obvious speed advantage when editing, but the drawback is that the file
size cannot exceed available memory. Because the Amiga has a lot of memory
this should not be a problem for most users.
CED will automatically dissociate itself from the CLI it is run from.
This means entering:
1> CED myfile
will load CED and then return control immediately to the CLI - you do
not need to 'RUN' it with the RUN command. You can also use EndCLI with
CED still running and the CLI will be removed. However, if you want any
DOS commands that you run from CygnusEd Professional (using the DOS/ARexx
interface) to be able to use the CLI window for input and output you should
specify -keepio on the command line.
There are a few minor problems that may occur when you are using
CygnusEd Professional